﻿<!--
Majesty of Omega - The next evolution of macro management space strategy

Copyright 2007 André Claaßen

This file is protected by the terms and conditions of the
Microsoft Community License (Ms-CL 1.1), a copy of which should
have been distributed along with this software. If not,
you may find the license information at the following URL:

http://www.microsoft.com/resources/sharedsource/licensingbasics/communitylicense.mspx
-->

<UserControl
    xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
    xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
    xmlns:ValueConverters="clr-namespace:Majesty_of_Omega.GUI.ValueConverters;assembly="
    xmlns:Majesty_of_Omega_GUI_Controls="clr-namespace:Majesty_of_Omega.GUI.Controls"
    xmlns:Majesty_of_Omega_Config="clr-namespace:Majesty_of_Omega.Config;assembly=Majesty_of_Omega_BL"
    xmlns:Majesty_of_Omega_BL_Game="clr-namespace:Majesty_of_Omega.Model.Game;assembly=Majesty_of_Omega_BL"
    xmlns:GameConfiguration="clr-namespace:Majesty_of_Omega.Logic.GameConfiguration;assembly=Majesty_of_Omega_BL"
    x:Class="Majesty_of_Omega.GUI.Pages.Setup.Parts.RaceInfoPart"
	Margin="-3,0,0,0"
    >
    <UserControl.Resources>
        <ValueConverters:UriToImageConverter x:Key="UriToImageConverter"/>
        <ObjectDataProvider x:Key="SpreadSheetManagerDS" ObjectType="{x:Type Majesty_of_Omega_Config:SpreadSheetManager}"/>
        <ObjectDataProvider x:Key="GameConfiguratorDS" ObjectType="{x:Type GameConfiguration:GameConfigurator}"/>
    </UserControl.Resources>

    <!--DataContext="{Binding Path=GameSettings, Source={StaticResource GameConfiguratorDS}}"-->

    <Majesty_of_Omega_GUI_Controls:SetupPanelControl x:Name="LayoutRoot"  
                    HorizontalAlignment="Stretch" 
					Background="{x:Null}" VerticalAlignment="Stretch" Width="Auto" Height="Auto" Margin="0,0,0,0" >
        <Majesty_of_Omega_GUI_Controls:SetupPanelControl.TitleBackground>
            <LinearGradientBrush EndPoint="0,0.5" StartPoint="1,0.5" >
                <GradientStop Color="#FFB6B6B6" Offset="0"/>
                <GradientStop Color="#FFB6B6B6" Offset="1"/>
                <GradientStop Color="#FF333333" Offset="0.5"/>
            </LinearGradientBrush>
        </Majesty_of_Omega_GUI_Controls:SetupPanelControl.TitleBackground>
        <Majesty_of_Omega_GUI_Controls:SetupPanelControl.Header>
            <DockPanel>
                <TextBlock DockPanel.Dock="Left" Foreground="White" Text="{Binding Path=SelectedRace.Name, Mode=Default}" HorizontalAlignment="Left" Margin="3,0,0,0" VerticalAlignment="Center"/>
				<TextBlock DockPanel.Dock="Right" Foreground="White" Text="{Binding Path=SelectedRace.SpellingFormatted}"  HorizontalAlignment="Right" Margin="0,0,3,0" VerticalAlignment="Center"/>
			</DockPanel>
        </Majesty_of_Omega_GUI_Controls:SetupPanelControl.Header>

        <Grid >
            <Grid.RowDefinitions>
                <RowDefinition Height="0.591*"/>
                <RowDefinition Height="0.409*"/>
                <RowDefinition Height="32"/>
            </Grid.RowDefinitions>
            <Image  StretchDirection="Both" Stretch="UniformToFill" HorizontalAlignment="Center" Source="{Binding Path=SelectedRace.Picture, Converter={StaticResource UriToImageConverter}}" />
            <Border Grid.Row="1" BorderThickness="0,2,0,0" BorderBrush="#FFFFFFFF" Padding="0,2,0,0" Grid.RowSpan="1">
                <ScrollViewer CanContentScroll="True" VerticalScrollBarVisibility="Auto" >
                    <TextBlock Background="{DynamicResource PanelBackgroundBrush}"  
						Width="Auto" Height="Auto" TextWrapping="Wrap" Text="{Binding Path=SelectedRace.HistoryFormatted, Mode=Default}" ScrollViewer.VerticalScrollBarVisibility="Auto" IsHitTestVisible="False" />
				</ScrollViewer>
            </Border>
            <Border Grid.Row="2" Background="{DynamicResource PanelBackgroundBrush}" BorderThickness="0,2,0,0" BorderBrush="#FFFFFFFF">
                <Grid>
                    <Label Width="Auto" Content="Empire Name" HorizontalAlignment="Left" Margin="0,0,0,4" VerticalAlignment="Bottom"/>
                    <TextBox Text="{Binding Path=EmpireName, Mode=Default}" TextWrapping="Wrap" Margin="85,0,0,4" VerticalAlignment="Bottom"/>
                </Grid>
            </Border>
        </Grid>
    </Majesty_of_Omega_GUI_Controls:SetupPanelControl>
</UserControl>
